package com.demo.test.controller;

import com.demo.test.service.IRedisService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述:
 *
 * @author : lhb
 * @date : 2021-11-18 11:55
 */
@RestController
@Api(description = "获取redis分布式锁")
public class RedisController {

    @Autowired
    IRedisService iRedisService;

    @GetMapping("/getRedis")
    @ApiOperation(value = "获取redis分布式锁", response = String.class)
    public String getRedis() {
        return iRedisService.test();
    }
}
